Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix handler now checks in the background if the matrix is CSR. #190

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

pelesh
Copy link
Collaborator

@pelesh pelesh commented Sep 24, 2024

Since only CSR format is supported by the MatrixHandler methods for matrix-vector product and matrix norm, these methods will now check if the matrix is CSR and, if not, return an error. When (if) MatrixHandler supports other sparse formats, we can add switch to those methods to perform computations specific to the (supported) input matrix format.

This PR:

Copy link
Collaborator

@stonecoldhughes stonecoldhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the "csr" parameter is a really good improvement here. Minor comments include weighing the benefits of static assertions versus conditionals for checking ; using the "using" directive; extending a variable name to be more descriptive

resolve/matrix/Coo.cpp Show resolved Hide resolved
resolve/matrix/Coo.cpp Outdated Show resolved Hide resolved
resolve/matrix/Coo.cpp Show resolved Hide resolved
resolve/matrix/Sparse.hpp Outdated Show resolved Hide resolved
resolve/matrix/MatrixHandlerCpu.cpp Outdated Show resolved Hide resolved
pelesh added a commit that referenced this pull request Sep 25, 2024
@pelesh pelesh force-pushed the matrix-handler-types-dev branch from 67915e1 to c2ed0c8 Compare September 26, 2024 20:12
@pelesh pelesh merged commit bd7b1c1 into develop Sep 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MatrixHandler::matrixInfNorm should not assume that the input matrix is in the csr format
2 participants